﻿using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.Text;

/// <summary>
/// Summary description for Ccompetition
/// </summary>
public class Ccompetition
{
    DataAccess da = new DataAccess();
    

    public DataTable GetAllCompetition()
    {
        try
        {
            DataTable _dt = new DataTable();
            _dt = da.GetAllRecord("select * from Competition");
            return _dt;
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }

    public DataTable GetTopAwards()
    {
        try
        {
            DataTable _dt = new DataTable();
            _dt = da.GetAllRecord("select top 7 name from Competition ORDER BY comId DESC");
            return _dt;
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }

	public Ccompetition()
	{
		//
		// TODO: Add constructor logic here
		//
	}
}